package com.hnjfzn.gateway.service;

import java.io.IOException;
import com.hnjfzn.common.core.exception.CaptchaException;
import com.hnjfzn.common.core.web.domain.AjaxResult;

/**
 * 验证码处理

 */
public interface ValidateCodeService
{
    /**
     * 生成验证码
     */
    public AjaxResult createCaptcha() throws IOException, CaptchaException;

    /**
     * 校验验证码
     */
    public void checkCaptcha(String key, String value) throws CaptchaException;

    /**
     * 短信验证码校验
     *
     * @param phone 手机号
     * @param uuid 标识
     * @param code 验证码
     * @throws CaptchaException
     */
    public void checkCaptcha(String phone, String uuid, String code) throws CaptchaException;
}
